package com.sdwz.user.controller;


import com.sdwz.commonutil.Result;
import com.sdwz.user.service.BorrowCardInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 * 借阅卡信息表 前端控制器
 * </p>
 *
 * @author testjava
 * @since 2021-03-28
 */
@RestController
@RequestMapping("/admin/user/borrowCard")
public class BorrowCardInfoController {

    @Autowired
    BorrowCardInfoService borrowCardInfoService;

    /**
     * 更改借阅卡状态
     * @param userId
     * @param status
     * @return
     */
    @GetMapping("/updateCardStatus/{userId}/{status}")
    public Result updateCardStatus(@PathVariable String userId,
                                   @PathVariable String status){
        borrowCardInfoService.updateCardStatus(userId,Integer.parseInt(status));
        return Result.ok();
    }
}

